from django.conf.urls.defaults import *
from dsp.core.feeds import LatestEntries
from django.contrib import admin
from django.conf import settings

admin.autodiscover()

feeds = {
    'latest': LatestEntries,

}

urlpatterns = patterns('',
    # Example:
    # (r'^blog/', include('blog.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
(r'^index', 'dsp.core.views.blog'),
    
     (r'^admin/(.*)', admin.site.root),
     (r'^admin/doc/', include('django.contrib.admindocs.urls')),

(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_DOC_ROOT}),
(r'^write', 'dsp.core.views.write'),
(r'^read', 'dsp.core.views.read'),
(r'^theme', 'dsp.core.views.themehome'),
(r'^edittheme/(?P<name>[^/]*)$', 'dsp.core.views.edittheme'),
(r'^savetheme', 'dsp.core.views.savetheme'),
(r'^blog/(?P<title>[^/]+)/$', 'dsp.core.views.view_post'),
(r'^tag/(?P<name>[^/]+)/$', 'dsp.core.views.view_tag'),
(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),

)

